//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.ruoyi.system.feign.controller;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.system.feign.service.impl.RemoteDictServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping({"/remote/dict"})
public class RemoteDictController {
    @Autowired
    RemoteDictServiceImpl remoteDictService;

    public RemoteDictController() {
    }

    @PostMapping({"/getDictLabel"})
    public String getDictLabel(@RequestBody JSONObject inParam) {
        System.out.println("feign接到的--" + inParam);
        return this.remoteDictService.getDictLabel(inParam.getString("dictType"), inParam.getString("dictValue"), inParam.getString("separator"));
    }

    @PostMapping({"/getDictValue"})
    public String getDictValue(@RequestBody JSONObject inParam) {
        return this.remoteDictService.getDictValue(inParam.getString("dictTyp"), inParam.getString("dictValue"), inParam.getString("separator"));
    }
}
